package com.reform.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.reform.mapper.BatchMapper;
import com.reform.pojo.phase.Batch;
import com.reform.service.IBatchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 批次表 服务实现类
 * </p>
 *
 * @author mortale
 * @since 2021-07-13
 */
@Service
public class BatchServiceImpl extends ServiceImpl<BatchMapper, Batch> implements IBatchService {

    @Autowired
    BatchMapper batchMapper;

    @Override
    public int creatBatch(Batch batch) {
        return batchMapper.insert(batch);
    }

    @Override
    public int deleteBatch(String batch_id) {
        return batchMapper.deleteById(batch_id);
    }

    @Override
    public int updateBatch(Batch batch) {
        return batchMapper.updateById(batch);
    }

}
